<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of cmsPager
 *
 * @author piotr
 */
class cmsPager extends sfDoctrinePager
{
  public function getResults()
  {
    return $this->getQuery()->fetchArray();
  }
  
  public function setPagination(sfWebRequest $request, Doctrine_Query $q)
  {     
    $this->setMaxPerPage(sfConfig::get('app_max_records_per_page'));
    
    $this->setQuery($q);
    $this->setPage($request->getParameter('page', 1));
    $this->init();
    
    return $this;
  } 
}

?>
